﻿using System.Collections.Generic;
using fc2editor.DataModel;

namespace fc2editor.Utils
{
    public class WeaponsCategoryComparer : IEqualityComparer<WeaponsCategory>
    {
        #region IEqualityComparer<WeaponsCategory> Members

        public bool Equals(WeaponsCategory x, WeaponsCategory y)
        {
            return x.Name == y.Name && x.ID == y.ID;
        }

        public int GetHashCode(WeaponsCategory obj)
        {
            return 17 + 23 * obj.Name.GetHashCode() + 19 * obj.ID.GetHashCode();
        }

        #endregion
    }
}
